package com.itdachang.design.behavioral.visitor;

import com.itdachang.design.structural.adapter.Player;

/**
 * @author gcq
 * @create 2022-02-16
 */
public class XiaoAi {
    private CPU cpu = new CPU("武汉天气");
    private Disk disk = new Disk("武汉天气");

    void answerQueston() {
        cpu.work();
        disk.work();
    }
    public void acceptUpdate(Vistor aPackage) {
        // 升级
        aPackage.vistCPU(cpu);
        aPackage.vistDisk(disk);
    }
}